/**
 * @author dumeng
 */
import request from '@/utils/request'

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}

/**
 * 抽奖活动查询
 * @param {*} query
 */
export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntable/queryPage',
    method: 'post',
    data
  })
}

/**
 * 活动基本信息详情
 * @param {*} query
 */
export function get(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntable/get',
    method: 'get',
    params: { id }
  })
}
/**
 * 创建活动基本信息
 * @param {*} data
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntable/insert',
    method: 'post',
    data
  })
}

/**
 * 编辑活动基本信息
 * @param {*} data
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntable/update',
    method: 'post',
    data
  })
}

/**
 * 删除活动
 * @param {*} ids
 */
export function del(ids) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntable/deleteByIds',
    method: 'get',
    params: { ids }
  })
}
